<%@ page contentType="text/html; charset=utf-8" language="java"%>
<%@ page import="cn.agiledata.bank.common.util.MD5"%>
<%@ page import="cn.agiledata.bank.common.util.DateUtil"%>
<%@ page import="java.util.Date"%>
<%
    /* 
     * <p>Title: </p>
     * <p>Description: </p>
     * <p>Copyright: Copyright (c) 2007</p>
     * @author jl
     * @version 1.0
     */
    request.setCharacterEncoding("UTF-8");
    String version="1.0.0"; //接口版本
    String requestUrl = "http://localhost:8080/webpay/page/netreturn/netReturnRequest.do";
    String merchantId = "1120070416084124001"; //注册商户在支付系统的客户编号
    String merchantKey = "111111";         //注册商户在支付系统设置的密钥
    String merchantUrl = "http://192.168.1.85:8080/merchant/mockresponse.jsp";  //商户反馈url
    //是否支付
    String payOrNot="1";
    //是否批量
    String batchOrNot="1";
    String orderIds = "GD20080707102112,20080707102112";
    String amounts = "123456.01,0.01";
    //订单的生成 
    //md5加密
    StringBuffer s = new StringBuffer("");
    s.append("merchantId=");
    s.append(merchantId);
    s.append("&merchantUrl=");
    s.append(merchantUrl);
    s.append("&orderId=");
    s.append(orderIds);
    s.append("&amount=");
    s.append(amounts);
    s.append("&merchantKey=");
    s.append(merchantKey);
    String mac = new MD5().getMD5ofStr(s.toString());
%>
<HTML>
<HEAD>
<TITLE>模拟商户</TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
<!--
body,td,p,li,input,select {
	FONT-SIZE: 12px;
	text-decoration: none;
	line-height: 18px
}

.ncss {
	font-size: 12px;
	text-decoration: none;
	line-height: 18px;
}

.n2 {
	font-size: 11pt;
	line-height: 18px;
	text-decoration: none;
	color: #363636;
	font-weight: bold;
}

.login {
	font-size: 13px;
	font-weight: bold;
	color: #333333;
	line-height: 18px;
}

.lan {
	font-size: 12px;
	font-weight: bold;
	color: #003399;
}

.xin {
	color: #FF0000;
	font-size: 9pt;
	text-decoration: none;;
	font-weight: bold
}

.xt {
	font-size: 12px;
	line-height: 18px;
	text-decoration: none;
	font-weight: bold;
	color: #000000;
}

.lan {
	line-height: 18px;
	text-decoration: none
}

a:link {
	color: #003399;
	text-decoration: underline;
}

a:visited {
	text-decoration: underline;
	color: #003399;
}

a:hover {
	text-decoration: none;
	color: #6FB7FF;
}

a:active {
	text-decoration: underline;
	color: #000000;
}

body {
	margin-left: 0px;
	margin-top: 0px;
}

.style8 {
	color: #000066;
	font-weight: bold;
	font-size: 16;
}

.style1 {
	font-size: 16px
}
-->
</style>
<script type="text/javascript">
function toSubmit(btnObj){
	//btnObj.disabled = true;
	btnObj.form.submit();
}
</script>
</HEAD>
<BODY>
<form name="frm" method="post" target="_blank"
      action="<%=requestUrl%>">
  <DIV align="center" class="style1"> <span class="style8"><br>
    退款申请<br>
    </span>
    <table width="751" border="0" cellpadding="0" cellspacing="0"
          bgcolor="#F6F9FF" id="table">
      <tr>
        <td width="50" height="1" bgcolor="#D8D8D8"></td>
      </tr>
      <tr>
        <td height="39" style="color: #3F5786; padding-left: 18px"><span style="font-size: 14px">模拟商联网站生成退款页：<strong> </strong> </span><strong>假设本页面是在商联网站上</strong> </td>
      </tr>
      <tr>
        <td align="center"><table width="96%" border="0" cellspacing="0"
                cellpadding="0">
            <tr>
              <td background="images/main_dotline.gif" height="1"></td>
            </tr>
          </table></td>
      </tr>
      <tr>
        <td height="25" align="center"><table width="100%" border="0" cellspacing="1"
                cellpadding="4">
            <tr align="center" bgcolor="#3F5786">
              <td height="25" colspan="3"><strong><font color="#FFFFFF">生成订单</font> </strong> </td>
            </tr>
          </table>
          <input type="hidden" name="version" value="<%=version%>">
          <input type="hidden" name="merchantId" value="<%=merchantId%>">
          <input type="hidden" name="merchantUrl" value="<%=merchantUrl%>">
          <input type="hidden" name="orderId" value="<%=orderIds%>">
          <input type="hidden" name="amount" value="<%=amounts%>">
          <input type="hidden" name="mac" value="<%=mac%>">
          <input type="hidden" name="payOrNot" value="<%=payOrNot%>">
          <input type="hidden" name="batchOrNot" value="<%=batchOrNot%>">
          <table width="80%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td height="25" colspan="3" align="center"
                    style="padding-bottom: 5px"><input type="button" onClick="toSubmit(this)"
                      value="申请退款">
              </td>
            </tr>
          </table></td>
      </tr>
      <tr>
        <td height="1" bgcolor="#D8D8D8"></td>
      </tr>
    </table>
    <br>
  </DIV>
  <div align="center"> <strong>以下这些数据将post给的returnMoneyRequest.do处理 </strong>
    <table width="751" border="0" cellpadding="4" cellspacing="1">
      <tr>
        <td width="50%" align="right"> version </td>
        <td width="50%"><%=version%> </td>
      </tr>
      <tr>
        <td width="50%" align="right"> merchantId </td>
        <td width="50%"><%=merchantId%> </td>
      </tr>
      <tr>
        <td align="right"> merchantUrl </td>
        <td><%=merchantUrl%> </td>
      </tr>
      <tr>
        <td align="right"> mac </td>
        <td><%=mac%> </td>
      </tr>
    </table>
  </div>
</form>
</BODY>
</HTML>
